package com.etc.entity;

import java.text.SimpleDateFormat;

import com.etc.util.UUIDHexGenerator;

/**
 * 
 * @Author Shadow 泽
 * @Date 2019年4月29日上午10:25:27
 *
 */
public class Orders {
	private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
	private Integer orderid;
	private String orderno;
	private User user;
	private Double orderprice;
	private Integer orderstatus;
	private Integer attid;
	private String orderdate;

	public Orders() {
		super();
	}

	/**
	 * 包含全部字段的构造器，所有字段均不能为空
	 * 
	 * @param orderid
	 * @param orderno
	 * @param user
	 * @param orderprice
	 * @param orderstatus
	 * @param attid
	 * @param orderdate
	 */
	public Orders(Integer orderid, User user, Double orderprice, Integer orderstatus, Integer attid) {
		super();
		this.orderid = orderid;
		this.orderno = new UUIDHexGenerator().generate();
		this.user = user;
		this.orderprice = orderprice;
		this.orderstatus = orderstatus;
		this.attid = attid;
	}

	@Override
	public String toString() {
		return "Orders [orderid=" + orderid + ", orderno=" + orderno + ", user=" + user + ", orderprice=" + orderprice
				+ ", orderstatus=" + orderstatus + ", attid=" + attid + ", orderdate=" + orderdate + "]";
	}

	public Integer getOrderid() {
		return orderid;
	}

	public void setOrderid(Integer orderid) {
		this.orderid = orderid;
	}

	public String getOrderno() {
		return orderno;
	}

	public void setOrderno(String orderno) {
		this.orderno = orderno;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Double getOrderprice() {
		return orderprice;
	}

	public void setOrderprice(Double orderprice) {
		this.orderprice = orderprice;
	}

	public Integer getOrderstatus() {
		return orderstatus;
	}

	public void setOrderstatus(Integer orderstatus) {
		this.orderstatus = orderstatus;
	}

	public Integer getAttid() {
		return attid;
	}

	public void setAttid(Integer attid) {
		this.attid = attid;
	}

	public String getOrderdate() {
		return orderdate;
	}

	public void setOrderdate(String orderdate) {
		this.orderdate = orderdate;
	}

}